package com.matt.service;

import com.dotflat.dashboard.vo.ChildrenClassCheckVO;
import com.matt.commons.dto.sso.StaffDTO;
import com.matt.commons.page.PagerQuery;
import com.matt.domain.Children;
import com.matt.domain.Classes;
import com.matt.foundation.DO.ClassListDO;
import com.matt.foundation.DO.TeacherDO;
import com.matt.foundation.query.ClassesQuery;
import com.matt.foundation.vo.WebClassesPageVo;
import com.matt.foundation.vo.classes.ClassesVo;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Map;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/7/6
 * *******************************
 */
public interface ClassesService {

    Page<WebClassesPageVo> getClassesByConditions(ClassesQuery query);

    List<Classes> getClassesByAreaAndCategroy(String areaId, Integer category);

    List<Classes> getActiveClassesByArea(String areaId);

    Page<WebClassesPageVo> getClassesByStaff(StaffDTO staff, String roleId, ClassesQuery classesQuery);

    Page<WebClassesPageVo> getClassesByStaff(String roleCode, ClassesQuery query);

    List<ClassListDO> getClassesByTeacher(String teacherId, String areaId);

    List<ClassListDO> getClassesByStaffId(String roleCode, String staffId, String areaId);

    Map getClassesById(String classesId);

    Classes getClassesById(String areaId, String classesId);

    Map getMemberByClassesId(String classId);


    Page<Children> getChildIdsByClassesId(String areaId, String classId, PagerQuery pagerQuery);

    Children getAnyMemberByClassesIdAndName(String areaId, String classId, String name);

    Map getPlanByClasses(String classesId, String date, String ticket, String staffId);

    Map getPlanByDay(Long day, String ticket);

    Classes createClasses(String classId ,String name, String areaId, String[] childrenIds, String[] teacherIds,String[] nurseIds,String[] doctorIds,
                          String[] cameraIds, String remark, Integer limitNum, String targetObjectId, StaffDTO inChargeTeacher,
                          Integer category, Integer beginMonth, Integer endMonth);

    Classes modifyClasses(String classesId, String classesName, String areaId, String[] childrenIds, String[] teacherIds,String[] nurseIds,
                          String[] cameraIds, String remark, Integer limitNum, String targetObjectId, StaffDTO inChargeTeacher,
                          Integer category, Integer beginMonth, Integer endMonth);

    Map getDetailByClassesId(String classId);
    List getDetailByClassesIdList(TeacherDO teacherDO);

    Boolean disable(String classId);

    Boolean enable(String classId);

    Classes scheduled(String classesId, String baseTime);

    List<ClassesVo> getClassesByAreaAndCategory(String areaId, Integer category);

    List<ClassesVo> getClassesByArea(String areaId);

    List<Classes> getNurseryClassesListByTargetObject(String allTargetObjectId, String targetObjectId);

    Integer getAreaNurseryClassesCount(String areaId, String date, boolean deleted);

    Integer getTeacherChildCheckInCount(String staffId, String date);

    Classes selectClassById(String classesId);


    /**
     * 考勤列表
     * @param query
     * @return
     */
    Page<ChildrenClassCheckVO> getClassCheckList(ClassesQuery query);

    /**
     * 考勤详情
     */
    Page<ChildrenClassCheckVO> getClassCheckDetail(ClassesQuery query);

    /**
     * 编辑宝宝入园、离园时间
     */
    void editChildrenCheckTime(ChildrenClassCheckVO childrenClassCheckVO);

}
